package com.atguigu.eduservice.mapper;

import com.atguigu.eduservice.entity.EduCourse;
import com.atguigu.eduservice.entity.EduTeacher;
import com.atguigu.eduservice.entity.vo.CoursePublishVo;
import com.atguigu.eduservice.entity.vo.frontVo.CourseWebVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 课程 Mapper 接口
 * </p>
 *
 * @author ZhanK
 * @since 2022-02-20
 */
@Mapper
public interface EduCourseMapper extends BaseMapper<EduCourse> {
       //查询最终发布的课程信息，里面包含了多张表的联合查询
       CoursePublishVo getPublishCourseInfo (String id);

       //课程发布后的列表分页查询，根据传入查询对象的属性进行判断，进行多条件联合查询
       List<CoursePublishVo> getPageCourse(Page<CoursePublishVo> page, @Param("courseVo") CoursePublishVo courseVo);

       //根据前端传入对象属性的值进行查询，然后导出Excel
       List<CoursePublishVo> getPageCourseExcel( @Param("courseVo") CoursePublishVo coursePublishVo);
       //    Front前端页面查询出课程的详细信息，包含讲师、课程分类、课程基本信息、课程简介多表查询
    CourseWebVo getBaseCourseInfo(String courseId);
}
